/*
 * Copyright (c) 2007, TopCoder, Inc. All rights reserved.
 */
using System;
using System.Runtime.Serialization;

namespace TopCoder.WinForms.Controls.CalendarView
{
    /// <summary>
    /// <para>This exception is thrown in relation to errors in the component. It is thrown directly by
    /// <see cref="CalendarViewControl"/> in response to errors. The constructors in this exception should wrap
    /// those in the base exception with the same signature.</para>
    /// </summary>
    /// <remarks>
    /// Thread-Safety: Instances of this class are immutable and thread safe.
    /// </remarks>
    /// <author>Ghostar</author>
    /// <author>yext</author>
    /// <author>argolite</author>
    /// <author>alex.dolin</author>
    /// <version>1.1</version>
    /// <copyright>Copyright (c) 2007, TopCoder, Inc. All rights reserved.</copyright>
    [Serializable]
    public class CalendarViewControlException : ApplicationException
    {
        /// <summary>
        /// <para>This is the default constructor for this exception.</para>
        /// </summary>
        public CalendarViewControlException()
        {
        }

        /// <summary>
        /// <para>This is a single-argument constructor for this exception that provides a message.</para>
        /// </summary>
        /// <param name="message">The error message for this exception, which can be null or empty.</param>
        public CalendarViewControlException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// <para>This is a two-argument constructor for this exception that provides a message and a cause.</para>
        /// </summary>
        /// <param name="message">The error message for this exception, which can be null or empty.</param>
        /// <param name="cause">The inner cause for this exception, which can be null.</param>
        public CalendarViewControlException(string message, Exception cause)
            : base(message, cause)
        {
        }

        /// <summary>
        /// <para>This is the standard constructor for controlling the serialization process.</para>
        /// </summary>
        /// <param name="info">The object that holds the serialized object data.</param>
        /// <param name="context">The contextual information about the source or destination.</param>
        protected CalendarViewControlException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}

